/*
 * motorTesting.cpp
 *
 *  Created on: Mar 31, 2014
 *      Author: mul8
 */
#include "MotorController.h"
#include <stdio.h>


void printPositions(int positions[], int motorNumbers) {
	for (int i = 0; i < motorNumbers; i++) {
		std::cout << "Motor " << i+1 << ":\t\t" << positions[i] << std::endl;
	}
}

int main (int argc, char **argv) {

	MotorController controller;

	int positions[24];
	std::vector<int> positionsVector;
	positionsVector.resize(24);
	int motorNumbers = 24;
	int count = 0;

	while (true) {

		//for (int i = 0; i < motorNumbers; i++) {
			positionsVector = controller.getMotorPositionSyncRead(24);
		//}

		std::cout << "Iteration " << count << std::endl;

		printPositions(positions, motorNumbers);

		std::cout << "\n\n--------------------------------------------------------\n";

		sleep(2);

		count++;

	}

}


